 /* 烟花粒子的基础样式 */
 .firework {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: white;
    border-radius: 50%;
    opacity: 0;
    animation: explode 1s ease-out forwards;
    pointer-events: none;
  }

  /* 烟花爆炸的动画效果 */
  @keyframes explode {
    0% {
      transform: scale(0) translate(0, 0);
      opacity: 1;
    }
    100% {
      transform: scale(1.5) translate(var(--x), var(--y)); /* 移动到随机位置 */
      opacity: 0;
    }
  }